The present invention relates to a processor apparatus equipped with a control unit such as an MCU (microcontroller) and an external memory externally connected thereto.
Since a built-in system using an MCU, which is large in scale, becomes large in program size over its entire system, a program and data cannot be stored in memories (ROM and RAM) lying inside the MCU, each comprising a single LSI (Large Scale Integration). Memories such as a flash ROM, an RAM and the like are connected to the outside of the MCU, and the program and data are frequently stored therein.
When the program and data are stored in the external memory in this way, there is a possibility that the reading, analysis and interpolation of the program and data by a third party will become easy because the external memory has no confidentiality as compared with a built-in memory.
On the other hand, a method for encrypting a program per se thereby to make it hard to perform an analysis that leads to program's falsification has been thought out to protect the program and data from their analyses and interpolation (refer to patent documents 1 (Japanese Unexamined Patent Publication No. 2001-230770) and 2 (Japanese Unexamined Patent Publication No. 2006-179029)). In such a method, for example, the encrypted program is stored in an external ROM and a decryption program stored in a built-in ROM whose confidentiality has been ensured is executed upon startup of the program thereby to decrypt the encrypted program lying in the external ROM, followed by being expanded to an external RAM. Thereafter, the program of the external RAM is executed to operate a system.
Such a method is however accompanied by problems that the external RAM enough to expand a program is required, thereby leading to an increase in the cost of the system, and further when address and data signals on a substrate are monitored upon program execution, program-contained data is easily available because the program expanded onto the external RAM has not been encrypted.